import { post } from '@/request/http'
import store from '@/store'

//查询费目属性列表
export  const  GetSysChargePropertyList=({PageSizes,PageIndexs,cprDepId,cprDesc})=>{
  return post('/FTKJWLHYPT/SysResultsFees/GetSysChargePropertyList',{
    Data:{
      Parameters:{
        FTKJWLHYPT:{
          fltId:store.state.user.FLT_UUID_DX_H,//车队ID
          cprDptId:store.state.user.DPTID_DX_H,//营运中心部门ID
          cprDepId,//区域ID
          cprDesc,//费目属性类型
          cprType:''
        }
      },
      Orderbys: {},
      PageIndexs: {
        FTKJWLHYPT:PageIndexs
      },
      PageSizes: {
        FTKJWLHYPT:PageSizes
      }
    }
  })
}

//新增费目属性
export const  AddSysDSLYCharge=({cprDesc,cprIsvalid,sysTmsChargePropertyValuesList})=>{
  return post('/FTKJWLHYPT/SysResultsFees/AddSysDSLYCharge',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          cprDesc,
          fltId:store.state.user.FLT_UUID_DX_H,
          cprDepId:store.state.user.DPTID_DX_H,//区域ID
          cprDptId:store.state.user.DPTID_DX_H,
          cprInsertuser:store.state.user.USR_CODE_DX_H,
          cprIsvalid,
          sysTmsChargePropertyValuesList
        }
      }
    }
  })
}

//根据id查询费目属性内容
export const GetChargePropertycontent=({cpvCprId})=>{
  return post('/FTKJWLHYPT/SysResultsFees/GetChargePropertyListModel',{

    Data: {
      Parameters: {
        FTKJWLHYPT: {
          cpvCprId,//费目属性id
          cpvFltId:store.state.user.FLT_UUID_DX_H,
          // cprDepId:store.state.user.DPTID_DX_H,//区域ID
        }
      }
    }
  })
}

//编辑
export const  UpdateChargeProperty=({cprDesc,cprIsvalid,cprId,sysTmsChargePropertyValuesList })=>{
  return post('/FTKJWLHYPT/SysResultsFees/UpdateChargeProperty',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          cprId,
          cprDesc,
          fltId:store.state.user.FLT_UUID_DX_H,
          cprDepId:store.state.user.DPTID_DX_H,//区域ID
          cprLstupduser:store.state.user.USR_CODE_DX_H,
          cprIsvalid,
          sysTmsChargePropertyValuesList
        }
      }
    }
  })
}

export const  DeleteChargePropertyModel=(cprId)=>{
  return post('/FTKJWLHYPT/SysResultsFees/DeleteChargePropertyModel',{
    Data: {
      Parameters: {
        FTKJWLHYPT: {
          cprId,//费目属性id
          fltId:store.state.user.FLT_UUID_DX_H,//车队id
        }
      }
    }
  })
}
